﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CityList.ascx.cs" Inherits="_5ChickDeal.Admin.Control.CityList" %>
<asp:Panel ID="PanelAdd"  CssClass="box" runat="server" DefaultButton="Submit">
        <div class="box-head">
            <h2>
                Thêm mới</h2>
        </div>
        <br />
        <span class="title">Nhập tỉnh (thành phố ) mới &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
        <asp:TextBox ID="TextBoxTinhThanh" runat="server" CssClass="field size0"></asp:TextBox>
        &nbsp;&nbsp;&nbsp;&nbsp; <span class="title">Chọn tỉnh thành&nbsp;&nbsp;</span>
        <asp:DropDownList DataTextField="ten" DataValueField="id" ID="DropDownListTinhThanh"
            runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownListTinhThanh_SelectedIndexChanged">
        </asp:DropDownList>
        <br />
        <br />
        <div class="buttons">
            <asp:Button CssClass="button" runat="server" ID="Submit" Text="Thêm" OnClick="Submit_Click" />
        </div>
    </asp:Panel>


<asp:Panel ID="PanelList"  CssClass="box" runat="server" DefaultButton="TimKiem">
    <asp:Panel ID="PanelError" runat="server" Visible="false">
        <div id="err" class="msg msg-error">
            <p>
                <asp:Label ID="label1" runat="server" Text="Lỗi! không thể xóa!"></asp:Label>
            </p>
            <a class="close" href="#">close</a>
        </div>
    </asp:Panel>
    <asp:Panel ID="PanelOk" runat="server" Visible="false">
        <div class="msg msg-ok">
            <p>
                <asp:Label ID="LabelOk" runat="server"></asp:Label>
            </p>
            <a class="close" href="#">close</a>
        </div>
    </asp:Panel>
    <br />
    <div class="box-head">
        <h2 class="left">
            Danh sách</h2>
        <div class="right">
            <label>
                Tìm kiếm</label>
            <asp:TextBox ID="TextBoxTimKiem" CssClass="field small-field" runat="server" />
            <asp:Button ID="TimKiem" CssClass="button" Text="Tìm" runat="server" OnClick="TimKiem_Click" />
        </div>
    </div>
   
    <div class="table">
        <asp:GridView ID="GridViewEmail" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
            Width="100%" AllowPaging="True" OnPageIndexChanging="GridViewEmail_PageIndexChanging"
            OnRowCancelingEdit="GridViewEmail_RowCancelingEdit" OnRowDataBound="GridViewEmail_RowDataBound"
            OnRowDeleting="GridViewEmail_RowDeleting" OnRowEditing="GridViewEmail_RowEditing"
            OnRowUpdating="GridViewEmail_RowUpdating" ShowFooter="True">
            <PagerSettings FirstPageText="Đầu" LastPageText="Cuối" Mode="NumericFirstLast" NextPageText="Tiếp"
                PreviousPageText="Trước" />
            <Columns>
                <asp:BoundField DataField="id" HeaderText="Mã">
                    <ItemStyle Width="40px" />
                </asp:BoundField>
                <asp:BoundField DataField="email" HeaderText="Email" />
                <asp:BoundField DataField="ten" HeaderText="Tỉnh thành" />
                <asp:CommandField ButtonType="Image" CancelImageUrl="~/Admin/Images/cancel.png" CancelText="Bỏ qua"
                    DeleteText="Xóa" EditImageUrl="~/Admin/Images/edit.png" EditText="Sửa" ShowEditButton="True"
                    UpdateImageUrl="~/Admin/Images/update.png" UpdateText="Cập nhật" HeaderText="Sửa">
                    <ItemStyle Width="75px" />
                </asp:CommandField>
                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Admin/Images/delete.jpg" ShowDeleteButton="True"
                    HeaderText="Xóa">
                    <ItemStyle Width="40px" />
                </asp:CommandField>
            </Columns>
            <FooterStyle CssClass="footer" />
            <PagerStyle CssClass="pagging" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="False" />
        </asp:GridView>
    </div>
</asp:Panel>